﻿/*
 * Copyright 2008 Pimm Hogeling
 * 
 * This file is part of Bomberleague. Contributions to this file were made
 * by (feel free to add your name and/or e-mail to this list if you believe
 * you should be mentioned here):
 * Pimm Hogeling <pimmhogeling@gmail.com>
 * 
 * Bomberleague is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or (at your
 * option) any later version.
 * 
 * Bomberleague is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Bomberleague. If not, see <http://www.gnu.org/licenses/>.
 */
package com.googlecode.bomberleague.utils {
	import flash.utils.getQualifiedClassName;
	public class WebLocator {
		private static const TRUNK_FOLDER:String = "/svn/trunk/";
		private static var _webDomain:String;
		/**
		 * The URL to the "trunk" of this project.
		 */
		public static function get trunk():String {
			return webDomain.concat(TRUNK_FOLDER);
		}
		/**
		 * The domain of this project.
		 */
		public static function get webDomain():String {
			if (!_webDomain) {
				var className:Array = getQualifiedClassName(WebLocator).split(".").reverse();
				className.shift();
				_webDomain = "http://" + className.join(".");
			}
			return _webDomain;
		}
	}
}